﻿<%@ Page Language="C#" MasterPageFile="~/DigitalTV.Master" AutoEventWireup="true" CodeBehind="ManterProgramacao.aspx.cs" Inherits="UI.ManterProgramacao" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="Principal" style="width:400px">
    
     <div id="Consulta" style="width:400px">
        <asp:Label ID="LabelCanal" runat="server" Text="Canal"></asp:Label>
        <asp:DropDownList ID="ddlCanal" runat="server" Style="z-index: 100; left: 49px;
            position: inherit; top: 11px">
        </asp:DropDownList>
     </div>
     
     <div id="Cadastro" class="divDados" style="width:400px">
             <table>
             <tr>
                 <td>
                 <asp:Label ID="Label1" runat="server" Text="Episodios Disponiveis"></asp:Label>
                 </td>
                 <td>
                  <asp:DropDownList ID="ddlEpisodio" runat="server" Style="z-index: 100; left: 49px;
            position: inherit; top: 11px">
        </asp:DropDownList>   
                  </td>
                 <td>
                 </td>
             </tr>
             <tr>
                 <td>
                     Data:
                     <asp:TextBox ID="tbDia" runat="server" Width="16px"></asp:TextBox>
                     <asp:TextBox ID="tbMes" runat="server" Width="16px"></asp:TextBox>
                     <asp:TextBox ID="tbAno" runat="server" Width="35px"></asp:TextBox>

                 </td>
                 <td>
                 
                     Hora:
                     <asp:TextBox ID="tbHora" runat="server" Width="16px"></asp:TextBox>   
                     &nbsp;   
                     <asp:TextBox ID="tbMinuto" runat="server" Width="16px"></asp:TextBox>

                                      
                 </td>
                 <td>
                     <asp:Button ID="Button1" runat="server" Text="+" onclick="Button1_Click" 
                         style="width: 22px" />
                        </td>
             </tr>
             <tr>
                 <td>
                     <asp:Button ID="btnLimpar" runat="server" onclick="Button2_Click" 
                         Text="Cancelar" />
                 </td>
                 <td>
                 </td>
                 <td>
                 </td>
             </tr>
         </table>
       </div>
       <br />
        <asp:ObjectDataSource ID="odsProgramacao" runat="server" 
            DataObjectTypeName="Negocios.ProgramacaoBO" DeleteMethod="Excluir" 
            InsertMethod="Inserir" OldValuesParameterFormatString="original_{0}" 
            SelectMethod="Consultar" TypeName="Negocios.ProgramacaoBOMetodos" 
            UpdateMethod="Consultar">
            <UpdateParameters>
                <asp:Parameter Name="id" Type="Int32" />
            </UpdateParameters>
            <SelectParameters>
                <asp:ControlParameter ControlID="ddlCanal" Name="id" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
       <br />
       <br />
        
    <div id="Tabela" style="width:400px">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="Black" GridLines="Vertical" Width="580px" 
            AllowPaging="True" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" 
            BorderWidth="1px" DataSourceID="odsProgramacao">
            <FooterStyle BackColor="#CCCC99" />
            <RowStyle BackColor="#F7F7DE" />
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" 
                    Visible="False" />
                <asp:BoundField DataField="Data_Hora" HeaderText="Data Hora" 
                    SortExpression="Data_Hora" />
                <asp:BoundField DataField="Episodio" HeaderText="Episodio" 
                    SortExpression="Episodio" />
                <asp:TemplateField HeaderText="Atualizar">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbAtualizar" runat="server" onclick="lbAtualizar_Click">Atualizar</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Remover">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbRemover" runat="server">Remover</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
    
    
    
    </div>
    </div>
</asp:Content>